import { _decorator, Component, Node, Sprite, SpriteFrame } from "cc";
const { ccclass, property } = _decorator;

@ccclass("BallManager")
export class BallManager extends Component {
  @property(SpriteFrame)
  normalSf: SpriteFrame = null;

  @property(SpriteFrame)
  activeSf: SpriteFrame = null;
  render(active: boolean) {
    this.getComponent(Sprite).spriteFrame = active
      ? this.activeSf
      : this.normalSf;
  }
}
